using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BHXH.Repository
{
    public partial class FrmOKCancel : FrmBase
    {
        public FrmOKCancel()
        {
            InitializeComponent();
        }

        protected virtual void btnOK_Click(object sender, EventArgs e)
        {
            //Close();
        }

        protected virtual void btnCancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.Escape:
                    btnCancel_Click(this, null);
                    break;
                case Keys.Enter:
                    btnOK_Click(this, null);
                    break;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
    }
}